﻿@{
    
    // Save Movieid in cookie
    if (Request.QueryString["screencastId"] != null && Request.QueryString["screencastId"].Count() > 0)
    {
        Response.Cookies["screenCast"].Value = Request.QueryString["screencastId"];
        Response.Cookies["screenCast"].Expires = DateTime.Now.AddDays(1);
    }
    
    Page.Title = "Order tickets for ";
    Layout = "~/_SiteLayout.cshtml";
}

@section featured {
<section class="featured">
    <div class="content-wrapper">
        <hgroup class="title">
            <h3>Select desired number of seats</h3>
        </hgroup>
    </div>
</section>
}


<script type="text/javascript">
    $(document).ready(function () {
        $('#normal, #children, #senior').change(function () {
            $.post("GetSeatsForTable", { screencastId: "@Convert.ToInt32(Request.QueryString["screencastId"])", time: "2pm" })
            .done(function (data) {
                $('.seats').html(data);
            });
        });

        $.post("GetSeatsForTable", { screencastId: "@Convert.ToInt32(Request.QueryString["screencastId"])", time: "2pm" })
        .done(function (data) {
            $('.seats').html(data);
        });

    });
</script>

<div>
    <div style="float: left; margin-right: 30px;">
        <p style="margin-bottom: 0;">Normal</p>
        <select id="normal">
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
        </select><br />

        <p style="margin-bottom: 0;">Children</p>
        <select id="children">
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
        </select><br />

        <p style="margin-bottom: 0;">Senior</p>
        <select id="senior">
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
        </select><br />
    </div>
    <div class="seats"></div>
</div>
